<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Pistols &amp; Petticoats: Cracking the Code by oceans_blue8</title>
<style type="text/css">

body { background-color: #ffffff; }
.CI {
text-align:center;
margin-top:0px;
margin-bottom:0px;
padding:0px;
}
.center   {text-align: center;}
.cover    {text-align: center;}
.full     {width: 100%; }
.quarter  {width: 25%; }
.smcap    {font-variant: small-caps;}
.u        {text-decoration: underline;}
.bold     {font-weight: bold;}
</style>
</head>
<body>
<h1><a href="https://archiveofourown.org/works/24861436">Pistols &amp; Petticoats: Cracking the Code</a> by <a class='authorlink' href='https://archiveofourown.org/users/oceans_blue8/pseuds/oceans_blue8'>oceans_blue8</a></h1>

<table class="full">

<tr><td><b>Series:</b></td><td>Pistols &amp; Petticoats [2]</td></tr>

<tr><td><b>Category:</b></td><td>Rizzoli &amp; Isles</td></tr>

<tr><td><b>Genre:</b></td><td>F/F, ask and you shall receive i guess?, because for some reason people wanted to read my ramblings about ciphers, this is just a short deleted scene from pistols &amp; petticoats</td></tr>

<tr><td><b>Language:</b></td><td>English</td></tr>

<tr><td><b>Status:</b></td><td>Completed</td></tr>

<tr><td><b>Published:</b></td><td>2020-06-22</td></tr>

<tr><td><b>Updated:</b></td><td>2020-06-22</td></tr>

<tr><td><b>Packaged:</b></td><td>2021-05-04 08:29:10</td></tr>

<tr><td><b>Rating:</b></td><td>General Audiences</td></tr>

<tr><td><b>Warnings:</b></td><td>No Archive Warnings Apply</td></tr>

<tr><td><b>Chapters:</b></td><td>1</td></tr>

<tr><td><b>Words:</b></td><td>1,338</td></tr>

<tr><td><b>Publisher:</b></td><td>archiveofourown.org</td></tr>

<tr><td><b>Story URL:</b></td><td>https://archiveofourown.org/works/24861436</td></tr>

<tr><td><b>Author URL:</b></td><td>https://archiveofourown.org/users/oceans_blue8/pseuds/oceans_blue8</td></tr>

<tr><td><b>Summary:</b></td><td><div class="userstuff">
              <p>Maura receives a mysterious coded message in the middle of the night, and she won't rest until she's figured out what it says.<br/>Deleted scene from Chapter 7 of Pistols &amp; Petticoats.</p>
            </div></td></tr>

<tr><td><b>Relationships:</b></td><td>Maura Isles &amp; Jane Rizzoli, Maura Isles/Jane Rizzoli</td></tr>

<tr><td><b>Series:</b></td><td>Pistols &amp; Petticoats [2]</td></tr>

<tr><td><b>Series URL:</b></td><td>https://archiveofourown.org/series/1798807</td></tr>

<tr><td><b>Comments:</b></td><td>6</td></tr>

<tr><td><b>Kudos:</b></td><td>16</td></tr>

</table>

<a name="section0001"><h2>Pistols &amp; Petticoats: Cracking the Code</h2></a>
<div class="story"><div class="fff_chapter_notes fff_head_notes"><b>Author's Note:</b><blockquote class="userstuff">
      <p>This is a deleted scene/extension of an existing scene in Pistols &amp; Petticoats, so it probably won’t make much sense if you haven’t read that! I wrote this as I was working through the development of the cipher used in Chapter 7 of that story, but I ultimately deleted it because it didn’t fit the flow of the story. I also didn’t think anyone would want to read it, but some people here and on ff.net asked me to post this, so I guess I was wrong! So by popular demand, here’s an insight into Maura’s head as she cracks the cipher.<br/>Disclaimer: I actually know next to nothing about cryptography! But I love researching random things and thought a cipher would add a nice touch to the story, so here is the result of probably too many hours spent looking this stuff up on the internet.</p>
    </blockquote></div><div class="userstuff module">
    
    <p>Atop the stack lay a plain piece of paper, folded in half. Maura couldn’t stop herself; her hands reached for the paper of their own volition, as if compelled to do so by some massive external force. Unfolding it, she revealed a row of characters, written in blocky handwriting:</p>
<p>
  <em>UAGEO—</em>
</p>
<p>
  <em>JN PRU JDAH GS DRBO GHV XJGXP ANBIU GFXR SDZWYC, UI NL GHV VAHIZ AF ZWEVZJHG RA HUI GMTZG OW XZQ RMXF ASX UFRN. PRZS NPHRR. LRLC RG ARM.</em>
</p>
<p>
  <em>CCXXXVIII:XL:I-IX</em>
</p>
<p>The sight of the letters sent a little thrill tingling through Maura’s entire body. She recognized it immediately—this was a cipher! Though cryptography was by no means her area of expertise, she’d dabbled in the subject just as a hobby. Despite her extensive background research, however, she had never before had the opportunity to put her knowledge to use in real life.</p>
<p>Maura set to work immediately, ignoring the contents of the chest in favor of the letter. Her first instinct was to look for a Caesar cipher—a type of single-alphabet shift cipher, which (according to Gaius Suetonius Tranquilus, biographer of Julius Caesar) had been the favored encryption device of the Roman emperor, who had used it with a shift of three. It was a relatively easy cipher to break, which made it the ideal place to start. The single-alphabet shift also meant that such a cipher could be easily detected by calculating letter and word frequencies—for example, using the knowledge that ‘e’ was the most commonly used letter in the English language.</p>
<p>She began with what appeared to be the greeting—‘<em>UAGEO</em>,’ followed by a dash. Given the format, the letters most likely stood for some standard form of address. (Her mind toyed with ‘howdy,’ which also had five letters, but Jane had said they didn’t really say that out West, so that theory was discarded rather quickly.) Whoever had delivered the box clearly knew her identity, and <em>UAGEO</em> contained the same number of letters as her name; it therefore seemed likely that it might stand for ‘Maura.’</p>
<p>Almost immediately, however, she realized that those five letters could not stand for her name, at least not if the method used were a Caesar cipher. Assuming U=M, and therefore a shift of eight, A would signify S, not A. Either <em>UAGEO</em> did not mean ‘Maura,’ or the cipher was a more complicated one. Maura suspected the latter, although naturally she would have to explore all possible avenues of inquiry to determine whether that assessment was correct.</p>
<p>She turned her attention to the letters at the bottom of the page: <em>CCXXXVIII:XL:I-IX. </em>Notably, the bottom text contained only five repeated letters, whereas the upper portion of the message contained the entire alphabet with the exception of the letter ‘k.’ In fact, Maura realized that <em>CCXXXVIII:XL:I-IX</em> did not stand for words at all, but rather for numbers: 238:40:1-9, written in Roman numerals. It seemed likely to her that the numbers were part of the key to the cipher; how, exactly, Maura had not yet determined.</p>
<p>She worked in silence by the light of her candle for another thirty minutes, during which she accomplished nothing major, until the wick had nearly burned out. With a sigh, Maura left the chest sitting on the table and went to her room to retrieve a second candle, unwilling to give up the investigation. In the dim light, Maura bumped into the little bookcase she’d filled as soon as she moved in, dislodging one of her many books, which fell directly onto her foot.</p>
<p>As soon as she’d finished cursing—<em>damn, that book felt especially heavy when it was landing on her toe!</em>—she stopped still, seized with a new theory. The note was a book cipher! Of course. How could she have overlooked it? Almost forgetting to grab a new candle in her excitement, she rushed back out to the table and grabbed up the book from inside the chest.</p>
<p><em>Jane Eyre. </em>Now that <em>was </em>odd. She’d been aware that whoever had delivered the chest knew her, but not so intimately; it was one thing to know a person’s name and another thing entirely to know their favorite childhood books. It should have been unsettling, but Maura couldn’t help but feel even more intrigued. Which was, perhaps, the point. Was this whole thing simply a ploy to manipulate her into unraveling the mystery of the chest?</p>
<p>Well, if it was, it was working. Maura had written out a few book ciphers of her own through the years, most notably in her summer letters to Charlotte; it had seemed like a fun, intimate-friend sort of thing to write to someone in a secret code, and Maura had never before had a friend with whom she could share those sorts of activities. Besides, Charlotte had been as much of a book worm as Maura herself.</p>
<p>…but this was supposed to be a way to keep her mind off the women she’d fallen for, which included Charlotte as well as Jane. Maura focused her attention back on the note. A book cipher usually presented as a series of numbers, with each set of numbers indicating a word that would be part of the final message. Her set of numbers—238:40:1-9—should therefore point to the fortieth line on page 238. The interval was unusual, though; it seemed to suggest the first through ninth words, but Maura thought it was unlikely that those nine words constituted the entirety of the message.</p>
<p>She flipped to page 238, line 40, words 1-9.</p>
<p>
  <em>“I am no bird; and no net ensnares me.”</em>
</p>
<p>The words were underlined, which sent a little shock running through her. The quote had been one of her favorites as a child, and she remembered underlining those nine words with a steady hand—black ink in a perfectly straight line. It seemed impossible, but Maura’s eyes sought out the top right corner of the book, and there it was: a little stain on the edges of the pages where she’d accidentally dripped jam while reading. This was not just any copy of <em>Jane Eyre. </em>It was Maura’s own book, a copy she hadn’t seen in at least ten years!</p>
<p>Seeing it now sent a little chill through her, and she couldn’t help but trace her fingers over the words. This definitely was not the full message, but maybe it was a key of some sort. Maura wracked her brain for any sort of cipher that would use such a key. It was too short to be a running key cipher, in which every letter of the message would be paired with one from the key; however, it could be consistent with a Vigenère cipher. (Contrary to popular belief, the cipher had <em>not </em>been invented by Blaise de Vigenère, to whom it was misattributed. Rather, it had been invented in the 16<sup>th</sup> century by the Italian cryptologist Giovan Battista Bellaso.)</p>
<p>A nine-word key was unusually long for such a cipher; still, there did not seem to be any other obvious alternative. Maura fetched a paper and pencil from the desk in her room and then returned to the table, quickly jotting down a <em>tabula recta</em>—a 26 by 26 square containing every possible shifted alphabet—before she painstakingly copied out the encoded message, pairing every encrypted letter with one from the key.</p>
<p>It was tedious work, but Maura knew she was going in the right direction when the decryption of UAGEO yielded a probable result: just as she had thought, it <em>did </em>translate to ‘Maura.’ With renewed vigor (and the help of a third candle, her second having burned out before she’d even realized much time had passed), she set to work until she’d translated the entire note into plain English.</p>
<p>Decoded, the message read:</p>
<p>
  <em>Maura—</em>
</p>
<p>
  <em>If you want to know the truth about your family, be at the river at midnight on the night of the next new moon. Come alone. Tell no one.</em>
</p>
  </div><div class="fff_chapter_notes fff_foot_notes"><b>Author's Note:</b><blockquote class="userstuff"><p>There you have it! Y’all can skip this if you don’t care about how I created the cipher, but since some people were curious:<br/>Originally the message was going to be encoded using a Caesar cipher with a shift of seven. Coincidentally, August 7th is Maura’s birthday, and it was also a new moon in 1869 (really! I look these things up because even though I realize no one is likely to fact-check me, I am a perfectionist and somehow it matters to me.). So a shift of seven seemed appropriate. However, the Caesar cipher is very easy to break without any external knowledge of the contents of the message; if you have to, you can break it simply by performing every one of the twenty-six possible shifts. It’s a pain, but it’s not difficult. Sorry, Julius Caesar, but your preferred method was really pretty shoddy!<br/>I figured whoever sent this message (no spoilers, although I’m sure y’all have theories!) would know that a Caesar cipher wouldn’t even be a challenge for Maura, so I went for something more difficult. At first it was going to be a double cipher, a running key cipher that was then encoded with a Caesar, but that was too hard even for Maura! So I went with something a little easier, the Vigenère, which is sort of like using multiple Caesar ciphers with different alphabet shifts. Fun fact: the Vigenère was considered unbreakable until 1863!<br/>The idea to use Jane Eyre came from the fact that it is my personal favorite classic novel, and I thought that Jane as a character would probably also be appealing to Maura for the same reasons I like her. (I find it easy to write Maura because we are a lot alike, lol.) So the page/line/word numbers come from my own copy of the book (which is from 1942, not 1847, but close enough). From there, I decided to use a quote that I’ve always particularly liked, and that became the key for the Vigenère cipher.<br/>I had so much fun creating this, so I hope seeing the process was fun for y’all as well!</p></blockquote></div></div>
</body>
</html>